function isNotEmpty(val)
{
	if(val=="")
	{
		return false;
	}
	else
	{
		return true;
	}
}

function valUsername(username)
{
	return isNotEmpty(username);
}

function valPwd(pwd,pwdcf)
{
	if(!isNotEmpty(pwd))
	{
		return false;
	}
	else
	{
		if(pwd!=pwdcf)
		{
			return false;
		}
		else
		{
			return true;
		}
	}
}

function valName(name)
{
	return isNotEmpty(name);
}

function valSchool(school)
{
	return isNotEmpty(school);
}

function valCollege(college)
{
	return isNotEmpty(college);
}
	
	
function valEmail(email)
{
	
	if(!isNotEmpty(email))
	{
		return false;
	}
	
	
	var reg=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
	if(!reg.test(email))
	{
		return false;
	}
	
	return true;
}